<?php
class preinfopage extends page{
	public $user;
	public function __construct(){
		parent::__construct();
		$this->user["id"] = $_SESSION["userId"];
		$this->user["name"] = $_SESSION["userName"];
		$this->user["number"] = $_SESSION["userNumber"];
		$this->title = "个人中心";
	}
	public function getLastLogin(){
		$userId = $this->user['id'];
		$dao= new preinfodao();
		$lastLogin =  $dao->getLastLogin('user',array('last_login_time as time','last_login_ip as ip'),"user.id='$userId'");
		$lastLogin['ip']=array_reverse(explode(',',$lastLogin['ip']));
		return $lastLogin;
	}
}
?>